package com.lagou.multipartdatasource.service.impl;

import com.lagou.multipartdatasource.domain.Student;
import com.lagou.multipartdatasource.mapper.StudentMapper;
import com.lagou.multipartdatasource.service.StudentService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class StudentServiceImpl implements StudentService {
    @Resource
    StudentMapper studentMapper;

    @Override
    public List<Student> getStudents() {
        return studentMapper.findUser();
    }

    @Override
    public void createAStudent(Student student) {
        studentMapper.insertUser(student);
    }
}
